{extend name='admin@main'}

{block name="button"}

<!--{if auth("add")}-->
<!--<button data-modal='{:url("add")}' data-title="添加来访记录信息" class='layui-btn layui-btn-sm layui-btn-primary'>添加来访记录信息</button>-->
<!--{/if}-->

<!--{if auth("remove")}-->
<!--<button data-action='{:url("remove")}' data-rule="id#{key}" data-csrf="{:systoken('remove')}" data-confirm="确定要删除这些信息吗？" action="{:url('department/remove')}" class='layui-btn layui-btn-sm layui-btn-primary'>删除访客记录信息</button>-->
<!--{/if}-->

{/block}

{block name="content"}
{php}
{//var_dump($list);}
{/php}
<div class="think-box-shadow">

    {include file='viplist/index_search'}
    <table class="layui-table" lay-skin="line">
        {notempty name='list'}
        <thead>
        <tr>
            <th class='list-table-check-td think-checkbox'>
                <label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
            </th>
            <th class='list-table-sort-td'>
                <button type="button" data-reload class="layui-btn layui-btn-xs">刷 新</button>
            </th>
            <th class='text-left nowrap'>会员名称</th>
            <th class='text-left nowrap'>所选套餐</th>
            <th class='text-left nowrap'>积分余额</th> 
            <th class='text-left nowrap'>开通套餐时间</th>
             <!-- <th class='text-left nowrap'>套餐到期时间</th>   -->         
                   
          <!--   <th class='text-center nowrap'>所属公司</th> -->
            <th class='text-left nowrap'>添加时间</th>
            <th class='text-left nowrap'></th>
        </tr>
        </thead>
        {/notempty}
        <tbody>
        {foreach $list as $key=>$vo}
        <tr data-dbclick>
            <td class='list-table-check-td think-checkbox'>
                <label><input class="list-check-box" value='{$vo.id}' type='checkbox'></label>
            </td>
             <td class='list-table-sort-td'>
                <label>{$vo.id}</label>
            </td>
            <td class='text-left nowrap'>{$vo.user_name|default=''}<!-- |微信昵称:{$vo.nickname} --></td>
            <td class='text-left nowrap'>{$vo.commodity_title|default='-'}</td>
            <td class='text-left nowrap'>{$vo.frequency}</td>
            <td class='text-left nowrap'>{$vo.create_at|format_datetime}</td>
        <!--     <td class='text-left nowrap'>{$vo.vip_date|format_datetime}</td> -->
            
   <!--          <td class='text-center nowrap'>
             {$vo.company_name|default='-'}
            </td> -->
            <td class='text-left nowrap'>
                {$vo.create_at|format_datetime}
            </td>
            {if false}
            <td class='text-left nowrap'>

                {if auth("edit")}
                <a data-dbclick class="layui-btn layui-btn-sm" data-title="编辑会员信息" data-modal='{:url("edit")}?id={$vo.id}&member_type=1'>编 辑</a>
                {/if}

                {if auth("state")}

                    {if isset($vo.status) and $vo.status eq 1}
                     <a class="layui-btn layui-btn-sm layui-btn-warm" data-confirm="确定要冻结该会员吗？" data-action="{:url('state')}" data-value="id#{$vo.id};status#2">冻 结</a>
                        {else}
                     <a class="layui-btn layui-btn-sm layui-btn-warm" data-action="{:url('state')}" data-value="id#{$vo.id};status#1">启 用</a>
                     {/if}
                {/if}


                {if auth("remove")}
                <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除该会员吗？" data-action="{:url('remove')}" data-value="id#{$vo.id}" data-csrf="{:systoken('remove')}" action="{:url('user/remove')}">删 除</a>
                {/if}

            </td>
            {/if}
        </tr>
        {/foreach}
        </tbody>
    </table>

    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}

</div>

{/block}
